﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Portal.Nhibernate.Repository;

namespace Portal
{
    public static class SettingCache
    {

        public static IList<ISetting> GetList()
        {
            IList<ISetting> list;
            if (!Cache.TryGet(CacheKey.SettingList, out list))
            {
                var categoryRepository = new SettingRepository();
                list = categoryRepository.Get().ToList();
                Cache.Set(CacheKey.SettingList, list);
            }
            return list;
        }


    }
}
